//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<CEffectCompiled9.cpp>
///	@path	~/src/graphics/dx9/
///	@date	2007/11/21
///	@desc	DX 9's compiled effect.

#include "config/config.h"

#include "lib/utilities/debug.h"
#include "lib/system/thread_debug.h"

#include "graphics/DxHelpers.h"
#include "graphics/dx9/CEffectCompiled9.h"

namespace xeres {

	IMPL_IOBJECT_CLASS( CEffectCompiled9 );

	// ctor
	CEffectCompiled9::CEffectCompiled9( RefWeak<IEffect> effect , ID3DXBuffer * buffer )
		: m_effect( effect )
		, m_buffer( buffer )
	{
	}

	CEffectCompiled9::~CEffectCompiled9( void )
	{
	}

	RefPass<IEffect> CEffectCompiled9::GetEffect( void )
	{
		return m_effect;
	}

	size_t CEffectCompiled9::GetCompiledSize( void )
	{
		return m_buffer->GetBufferSize();
	}

	const void * CEffectCompiled9::GetCompiledData( void )
	{
		return m_buffer->GetBufferPointer();
	}

} // namespace xeres
